<template>
  <div class="photoInfo">
    <van-card
      v-for="img in imgs"
      :key="img.card"
      :desc="img.memo"
      :title="img.name"
      :thumb="img.card"
    />
  </div>
</template>
<script>
import { getCategory } from '@/api/photo.js'
export default {
  data() {
    return {
      imgs: []
    }
  },
  created() {
    this.getphotoInfo()
  },
  methods: {
    async getphotoInfo() {
      const res = await getCategory('女生')
      this.imgs = res.data.data
      // console.log(res)
      // console.log(this.imgs)
    }
  }
}
</script>
<style lang="scss" scoped>
.photoInfo {
  .van-card__title {
    font-size: 22px;
    color: pink;
    margin-top: 10px;
    max-height: 50px;
    line-height: 22px;
  }
  .van-card__desc {
    font-size: 14px;
    margin-top: 14px;
  }
  .van-ellipsis {
    overflow: visible;
    white-space: normal;
  }
}
</style>